﻿//-----------------------------------------------------------------------
// <copyright file="Settings.xaml.cs" company="Microsoft Corporation">
//     Copyright Microsoft Corporation. All Rights Reserved. This code released under the terms of the Microsoft Public License (MS-PL, http://opensource.org/licenses/ms-pl.html.) This is sample code only, do not use in production environments.
// </copyright>
//-----------------------------------------------------------------------

namespace vsarFlightPlan
{
    using System;
    using Windows.System;
    using Windows.UI.Xaml.Controls;

    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class Settings : Page
    {
        /// <summary>
        /// The _view model
        /// </summary>
        private ViewModels.Settings _viewModel;

        public Settings()
        {
            this.InitializeComponent();
        }

        protected override void OnNavigatedTo(Windows.UI.Xaml.Navigation.NavigationEventArgs e)
        {
            if (_viewModel == null)
            {
                this._viewModel = new ViewModels.Settings();
                this.DataContext = _viewModel;
            }
        }

        private async void LaunchSignupClick(object sender, Windows.UI.Xaml.RoutedEventArgs e)
        {
            await Launcher.LaunchUriAsync(new Uri("http://www.visualstudio.com/"));
        }
    }
}